﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EM
{
    public class User
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }
        /// <summary>
        /// 数据唯一标识
        /// </summary>
        
        [Required]
        [StringLength(50)]
        public string? FirstName { get; set; }
        /// <summary>
        /// 姓_氏
        /// </summary>
        [Required]
        [StringLength(50)]
        public string? LastName { get; set; }
        /// <summary>
        /// 姓_名
        /// </summary>
        [NotMapped]
        public string? Name { get => this.FirstName + this.LastName; }
        [Required]
        public int Type { get; set; }
        /// <summary>
        /// 0：管理员1：厨师2：服务员
        /// </summary>
        [Required]
        public float Pay { get; set; }
        /// <summary>
        /// 支付薪资
        /// </summary>
        [Required]
        public bool Gender { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        public int Age { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        [Required]
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 加入时间
        /// </summary>
        public DateTime DimissionTime { get; set; }
        /// <summary>
        /// 离职时间
        /// </summary>
        public DateTime HolidayTime { get; set; }
        /// <summary>
        /// 休假时间
        /// </summary>

        /// <summary>
        /// 手机号
        /// </summary>
        [Required]
        [StringLength(20)]
        [Column("AA005")]
        public string? PhoneNumber { get; set; }

        /// <summary>
        /// 电子邮箱 XXXXX@NNN.com     
        /// </summary>
        [StringLength(150)]
        [Column("AA006")]
        public string? Email { get; set; }
    }
}
